package com.iv.durian.cloud.dao;

import com.iv.durian.cloud.RandomCode;
import com.iv.durian.cloud.dao.mapper.RandomCodeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class RandomCodeDao {

    @Autowired
    private RandomCodeMapper randomCodeMapper;

    public RandomCode get(String key){
        return randomCodeMapper.get(key);
    }

    public int add( RandomCode randomCode){
        return randomCodeMapper.add(randomCode);
    }

    public int update(String key,String code){
        return randomCodeMapper.update(key,code);
    }
}
